package entity

import (
	"github.com/jinzhu/gorm"
	"shqsoft.cn/pasnj/base"
)

//COMP_CLIE_KHBQ_DR 用户
type COMP_CLIE_KHBQ_DR struct {
	ID      int    `gorm:"AUTO_INCREMENT;primary_key;column:ID"`
	KHMC    string `gorm:"column:KHMC;"`
	KHBQ1   string `gorm:"column:KHBQ1;"`
	KHBQ2   string `gorm:"column:KHBQ2;"`
	CUID    int    `gorm:"column:CUID;"`
	KHBQID1 int    `gorm:"column:KHBQID1;"`
	KHBQID2 int    `gorm:"column:KHBQID2;"`
	DRJG    string `gorm:"column:DRJG"` //导入结果
}

//TableName User用户表名
func (COMP_CLIE_KHBQ_DR) TableName() string {
	return "T_COMP_CLIE_KHBQ"
}

func COMP_CLIE_KHBQ_DRAfterImport(tx *gorm.DB, params map[string]string) (err error) {
	tx.Exec("EXEC UP_COMP_CLIE_KHBQ")
	return nil
}

// COMP_CLIE_KHBQ_DREF G
func COMP_CLIE_KHBQ_DREF() base.EntityFunc {
	return func() interface{} {
		entity := COMP_CLIE_KHBQ_DR{}
		return &entity
	}
}

//COMP_CLIE_KHBQ_DRESF GJ
func COMP_CLIE_KHBQ_DRESF() base.EntitiesFunc {
	return func() interface{} {
		var entities []COMP_CLIE_KHBQ_DR
		return &entities
	}
}
func init() {
	base.DaoPoolObj.Put("COMP_CLIE_KHBQ_DR", base.NewDefaultDao(COMP_CLIE_KHBQ_DREF(), COMP_CLIE_KHBQ_DRESF(), nil))
	base.SetAfterCallBack("COMP_CLIE_KHBQ_DR", COMP_CLIE_KHBQ_DRAfterImport)
}
